package com.jcommander.controller;

import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import javax.swing.filechooser.FileSystemView;

import com.jcommander.model.FileSystemNode;

public class DiskListController {
	
	private final FileSystemView fsv = FileSystemView.getFileSystemView();
	private final List<FileSystemNode> diskListNode = new ArrayList<FileSystemNode>();
	
	public DiskListController() {
		File[] roots = File.listRoots(); 
		for (File file : roots) {
			diskListNode.add(new FileSystemNode(file));
		}
	}
	
	public List<FileSystemNode> getDiskListNode() {
		return Collections.unmodifiableList(diskListNode);
	}
	
	
	public int getSize() {
		return diskListNode.size();
	}
}
